﻿using Loki.Data;
using Loki.IoC;
using Loki.IoC.Registration;

namespace Luna.Data.SqlCe
{
    public class DatabaseInstaller : LokiContextInstaller
    {
        private static DatabaseInstaller sqlCE = new DatabaseInstaller();

        public static DatabaseInstaller SqlCE
        {
            get
            {
                return sqlCE;
            }
        }

        public override void Install(IObjectContext context)
        {
            context.Register(Element.For<IDatabaseManager>().ImplementedBy<SqlCeDatabaseManager>());
            context.Register(Element.For<IDatabaseAdapter>().ImplementedBy<LunaDatabaseAdapter>());
        }
    }
}